package com.wangzhenyu.learn.test.okhttp_

//OkHttp 网络请求的统一接口类

@Suppress("UNUSED")
interface HttpApi {

    /**
     * 抽象的http的get请求，异步
     */
    fun get(params: Map<String, Any>, path: String, callback: IHttpCallback)


    /**
     * 抽象的http的get请求，同步
     */
    fun getSync(params: Map<String, Any>, path: String ) :Any?{
        return Any()
    }

    /**
     * 抽象的http的post请求，同步
     */
    fun postSync(body: Any, path: String ):Any? = Any()
    /**
     * 抽象的http的post请求，异步
     */
    fun post(body: Any, path: String, callback: IHttpCallback)
}